#include "pch.h"
#include "FrontRenderer.h"
#include "RendererEngine.h"
#include "RenderViewport.h"
namespace mini
{
	CFrontRenderer::CFrontRenderer(CDevice* pDevice)
		:CRenderer(pDevice)
	{
		mOrder = 235;
		mRenderTypeFlag = RendererType::FrontRenderer;
	}


	void CFrontRenderer::addUnit(CUnit* pUnit, CMaterialUnit* pMaterialUnit, EntityType Type, INT32 zLayer)
	{
		CSkinMeshUnit* pSkinMeshUnit = dynamic_cast<CSkinMeshUnit*>(pUnit);
		if (nullptr == pSkinMeshUnit)
		{
			if (!pMaterialUnit->isShadow() )
			{
				CRenderer::addUnit(pUnit, pMaterialUnit, Type, zLayer);
			}
		}
	}

	void CFrontRenderer::commitToGpu()
	{
		CRenderer::commitToGpu();
	}

	CFrontRenderer::~CFrontRenderer()
	{
	}

}
